package zhoujunhao.rbac.domian.vo;

/**
 * 视图对象类型-用户
 *
 * @author 周均壕
 * @since 2025/6/16 16:35
 */
public class UserVo extends BaseVo {
    public String username;
    public String name;
    public String moblie;
    public String email;
    public int deptId;
    public String deptName;
    public int roleId;
    public String roleName;
    public boolean enabled = true;

    public UserVo() {
    }

    public UserVo(int id, String username, String name, String moblie, String email, int deptId,
                  String deptName, int roleId, String roleName, boolean enabled) {
        super(id);
        this.username = username;
        this.name = name;
        this.moblie = moblie;
        this.email = email;
        this.deptId = deptId;
        this.deptName = deptName;
        this.roleId = roleId;
        this.roleName = roleName;
        this.enabled = enabled;
    }

    @Override
    public String toString() {
        return String.format("ID：%d,用户名：%s,姓名：%s,手机：%s,邮箱：%s,部门名称：%s,角色名称：%s,状态：%s\n",
                id, username, name, moblie, email, deptName,
                roleName, enabled ? "启用" : "停用");
    }
}
